package ModelLayer;



public class RentMachines
{
    
    private int quantity;
    private Machines rentMachine;
    private Rent rentData;
    private double subTotal;
    private boolean quantityFail;

   
    public RentMachines(Machines newRentMachine, int quantity)
    {
       rentMachine = newRentMachine;
       this.quantity = quantity;
       if ( quantity > 0)
       {
           quantityFail = true;
       }
       
       
    }

   
    public void addMachine(Machines newRentMachine)
    {
        rentMachine = newRentMachine;
    }
    
    public int getQuantity()
    {
        return quantity;
    }
    
    public double getSubtotal()
    {
        subTotal = 0;
        subTotal = rentMachine.getRentalPrice() * getQuantity() * rentData.getRentDays();
        return subTotal;
   }



}


